package com.qianda.qdminiapp.domain.model.user;

import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 
 * </p>
 *
 * @author cw
 * @since 2019-08-06
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("USER")
public class User extends Model<User> {

    private static final long serialVersionUID = 1L;

    /**
     * 用户的ID
     */
    @TableId(value = "USER_ID", type = IdType.AUTO)
    private Integer userId;

    @TableField("USER_NAME")
    private String userName;

    @TableField("USER_OPENID")
    private String userOpenid;

    /**
     * 用户unionid
     */
    @TableField("USER_UNIONID")
    private String userUnionid;

    @TableField("USER_MONEY")
    private BigDecimal userMoney;

    /**
     * 千千币
     */
    @TableField("USER_QIANQIANBI")
    private BigDecimal userQianqianbi;

    /**
     * 创建该用户的时间
     */
    @TableField("CREATE_TIME")
    private String createTime;

    @TableField("USER_TOTAL_MONEY")
    private BigDecimal userTotalMoney;

    /**
     * 门店福利额度设置
     */
    @TableField("USER_FULI_QQB")
    private BigDecimal userFuliQqb;

    /**
     * 门店福利设置
     */
    @TableField("USER_STORE_SET_FULI")
    private Integer userStoreSetFuli;

    /**
     * 门店库存管理
     */
    @TableField("USER_STORE_INVENTORY")
    private Integer userStoreInventory;

    private Integer isWithdraw;

    /**
     * 是否为新用户0:新用户  1:不是新用户
     */
    private Integer isNewUser;


    @Override
    protected Serializable pkVal() {
        return this.userId;
    }

}
